home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Source / GNU / libg++ / libio / stdio / popen.c < prev    next >
C/C++ Source or Header  |  1994-02-15  |  438b  |  24 lines

  1. #include "libioP.h"
  2. #include "stdio.h"
  3. #include <errno.h>
  4.  
  5. FILE *
  6. popen(command, mode)
  7.      const char *command; const char *mode;
  8. {
  9.   return _IO_popen(command, mode);
  10. }
  11.  
  12. int
  13. pclose(fp)
  14.      FILE *fp;
  15. {
  16. #if 0
  17.   /* Does not actually test that stream was created by popen(). Instead,
  18.      it depends on the filebuf::sys_close() virtual to Do The Right Thing. */
  19.   if (fp is not a proc_file)
  20.     return -1;
  21. #endif
  22.   return _IO_fclose(fp);
  23. }
  24.